<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文档碎片.createDocumentFragment</title>

<!-- <script type="text/javascript">
    window.onload=function(){
        var oUl=document.getElementById('ul1');
    
        for(var i=0;i<10000;i++){
           var oLi=document.createElement('li');
           oUl.appendChild(oLi);
        }
    };
</script>     -->

<script type="text/javascript">
    window.onload=function(){
        var oUl=document.getElementById('ul1');
        var oFrag=document.createDocumentFragment();

        for(var i=0;i<10000;i++){
           var oLi=document.createElement('li');
           oFrag.appendChild(oLi);
        }
        oUl.appendChild(oFrag);
    };
</script>
</head>
<body>
    <ul id="ul1">
    </ul>
</body>
</html>